import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
// 导入 element 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// element 国际化
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// 导入pinia
import pinia from './store'
// 引入全局样式
import '@/assets/css/common.css'

// 创建实例
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app
  .use(router)
  .use(ElementPlus)
  .use(ElementPlus, {
    locale: zhCn
  })
  .use(pinia)
  .mount('#app')
